package com.buba.springcloud.controller;

import com.buba.springcloud.entities.CommonResult;
import com.buba.springcloud.entities.HfFoods;
import com.buba.springcloud.service.HFService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@Slf4j
public class HFTestController {
    @Resource
    private HFService hfService;

    @GetMapping("/findAll")
    public CommonResult findAll() {
        List<HfFoods> foods = hfService.findAll();
        System.out.println("wdadasdaad实打实嗷嗷嗷嗷ad");
        return new CommonResult<>(200, "查询成功",foods);
    }
}
